package user

import (
	"github.com/labstack/echo"

	"goweb/modules/user/controllers"
)

// type Context struct {
// 	echo.Context
// }

func Router(e *echo.Echo) {
	ctrl := new(controllers.Class)
	ctrl.Router = e
	e.Use(func(h echo.HandlerFunc) echo.HandlerFunc {
		return func(c echo.Context) error {
			//cc := &Context{c}
			ctrl.Context = c
			return h(c)
		}
	})
	e.GET("/user/login", ctrl.Login)
	e.GET("/user/login", ctrl.Login)
}
